package com.yckj.day07;

public class Demo3 {
	public static void main(String[] args) {
		f1("zhangsan","wangwu","lili","lucy","tom");
        f1(23,"wangwu",17,78,89,100);
        f1("lily",35,35,"wangwu","zwhgg");
		f1("lucy");
	}
	//方法的重载
	public static void f1(String name) {
		    System.out.println(name);
	}
	public static void f1(String... args) {//可变参数，个数由实际参数确定
		for (int i = 0; i < args.length; i++) {
			    System.out.println(args[i]);
		}
	}

	public static void f1(int age,String name,int... n) {
		System.out.println(age);
		System.out.println(name);
		for (int i = 0; i < n.length; i++) {
			System.out.println(n[i]);
		}
	}
	public static void f1(String name,int age1,int age2,String... name1) {
		
	}
//	public static void f1(String... names ,int age){//错误写法
//		
//	}
	

}